Selector

interface Selector<T>

Unified interface which can be used in any system which require some selection functionality

Functions

clearSelection
Link copied to clipboard
abstract suspend fun clearSelection()
forceDeselect
Link copied to clipboard
abstract suspend fun forceDeselect(element: T)
forceSelect
Link copied to clipboard
abstract suspend fun forceSelect(element: T)
toggleSelection
Link copied to clipboard
abstract suspend fun toggleSelection(element: T)

Properties

itemSelected
Link copied to clipboard
abstract val itemSelected: SharedFlow<T>
itemUnselected
Link copied to clipboard
abstract val itemUnselected: SharedFlow<T>
selectedItems
Link copied to clipboard
abstract val selectedItems: List<T>

Inheritors

SingleSelector
Link copied to clipboard
MultipleSelector
Link copied to clipboard

Extensions

contains
Link copied to clipboard
inline operator fun <T> Selector<T>.contains(element: T): Boolean
inline operator fun <T> Selector<T>.contains(element: T): Boolean
inline operator fun <T> Selector<T>.contains(element: T): Boolean
forceDeselect
Link copied to clipboard
inline suspend fun <T> Selector<T>.forceDeselect(elements: List<T>)
inline suspend fun <T> Selector<T>.forceDeselect(firstElement: T, vararg elements: T)
inline suspend fun <T> Selector<T>.forceDeselect(elements: List<T>)
inline suspend fun <T> Selector<T>.forceDeselect(firstElement: T, vararg elements: T)
inline suspend fun <T> Selector<T>.forceDeselect(elements: List<T>)
inline suspend fun <T> Selector<T>.forceDeselect(firstElement: T, vararg elements: T)
forceSelect
Link copied to clipboard
inline suspend fun <T> Selector<T>.forceSelect(elements: List<T>)
inline suspend fun <T> Selector<T>.forceSelect(firstElement: T, vararg elements: T)
inline suspend fun <T> Selector<T>.forceSelect(elements: List<T>)
inline suspend fun <T> Selector<T>.forceSelect(firstElement: T, vararg elements: T)
inline suspend fun <T> Selector<T>.forceSelect(elements: List<T>)
inline suspend fun <T> Selector<T>.forceSelect(firstElement: T, vararg elements: T)
itemSelectionFlow
Link copied to clipboard
fun <T> Selector<T>.itemSelectionFlow(element: T, scope: CoroutineScope): SharedFlow<Boolean>
fun <T> Selector<T>.itemSelectionFlow(element: T, scope: CoroutineScope): SharedFlow<Boolean>
fun <T> Selector<T>.itemSelectionFlow(element: T, scope: CoroutineScope): SharedFlow<Boolean>
nothingSelected
Link copied to clipboard
inline fun <T> Selector<T>.nothingSelected(): Boolean
inline fun <T> Selector<T>.nothingSelected(): Boolean
inline fun <T> Selector<T>.nothingSelected(): Boolean
toggleSelection
Link copied to clipboard
inline suspend fun <T> Selector<T>.toggleSelection(elements: List<T>)
inline suspend fun <T> Selector<T>.toggleSelection(firstElement: T, vararg elements: T)
inline suspend fun <T> Selector<T>.toggleSelection(elements: List<T>)
inline suspend fun <T> Selector<T>.toggleSelection(firstElement: T, vararg elements: T)
inline suspend fun <T> Selector<T>.toggleSelection(elements: List<T>)
inline suspend fun <T> Selector<T>.toggleSelection(firstElement: T, vararg elements: T)